3.1242 \(\int \frac{(A+B x) \sqrt{d+e x}}{\left (b x+c x^2\right )^2} \, dx\)

Optimal. Leaf size=171 \[ -\frac{\tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right ) (A b e-4 A c d+2 b B d)}{b^3 \sqrt{d}}+\frac{\sqrt{d+e x} (b B-2 A c)}{b^2 (b+c x)}+\frac{\left (3 A b c e-4 A c^2 d+b^2 (-B) e+2 b B c d\right ) \tanh ^{-1}\left (\frac{\sqrt{c} \sqrt{d+e x}}{\sqrt{c d-b e}}\right )}{b^3 \sqrt{c} \sqrt{c d-b e}}-\frac{A \sqrt{d+e x}}{b x (b+c x)} \]

[Out]

((b*B - 2*A*c)*Sqrt[d + e*x])/(b^2*(b + c*x)) - (A*Sqrt[d + e*x])/(b*x*(b + c*x)
) - ((2*b*B*d - 4*A*c*d + A*b*e)*ArcTanh[Sqrt[d + e*x]/Sqrt[d]])/(b^3*Sqrt[d]) +
 ((2*b*B*c*d - 4*A*c^2*d - b^2*B*e + 3*A*b*c*e)*ArcTanh[(Sqrt[c]*Sqrt[d + e*x])/
Sqrt[c*d - b*e]])/(b^3*Sqrt[c]*Sqrt[c*d - b*e])

_______________________________________________________________________________________

Rubi [A]  time = 0.713746, antiderivative size = 171, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.269 \[ -\frac{\tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right ) (A b e-4 A c d+2 b B d)}{b^3 \sqrt{d}}+\frac{\sqrt{d+e x} (b B-2 A c)}{b^2 (b+c x)}-\frac{\left (-b c (3 A e+2 B d)+4 A c^2 d+b^2 B e\right ) \tanh ^{-1}\left (\frac{\sqrt{c} \sqrt{d+e x}}{\sqrt{c d-b e}}\right )}{b^3 \sqrt{c} \sqrt{c d-b e}}-\frac{A \sqrt{d+e x}}{b x (b+c x)} \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*Sqrt[d + e*x])/(b*x + c*x^2)^2,x]

[Out]

((b*B - 2*A*c)*Sqrt[d + e*x])/(b^2*(b + c*x)) - (A*Sqrt[d + e*x])/(b*x*(b + c*x)
) - ((2*b*B*d - 4*A*c*d + A*b*e)*ArcTanh[Sqrt[d + e*x]/Sqrt[d]])/(b^3*Sqrt[d]) -
 ((4*A*c^2*d + b^2*B*e - b*c*(2*B*d + 3*A*e))*ArcTanh[(Sqrt[c]*Sqrt[d + e*x])/Sq
rt[c*d - b*e]])/(b^3*Sqrt[c]*Sqrt[c*d - b*e])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 93.8459, size = 167, normalized size = 0.98 \[ \frac{\sqrt{d + e x} \left (A c - B b\right )}{b c x \left (b + c x\right )} - \frac{\sqrt{d + e x} \left (2 A c - B b\right )}{b^{2} c x} - \frac{\left (A b e - 4 A c d + 2 B b d\right ) \operatorname{atanh}{\left (\frac{\sqrt{d + e x}}{\sqrt{d}} \right )}}{b^{3} \sqrt{d}} + \frac{\left (- 3 A b c e + 4 A c^{2} d + B b^{2} e - 2 B b c d\right ) \operatorname{atan}{\left (\frac{\sqrt{c} \sqrt{d + e x}}{\sqrt{b e - c d}} \right )}}{b^{3} \sqrt{c} \sqrt{b e - c d}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(e*x+d)**(1/2)/(c*x**2+b*x)**2,x)

[Out]

sqrt(d + e*x)*(A*c - B*b)/(b*c*x*(b + c*x)) - sqrt(d + e*x)*(2*A*c - B*b)/(b**2*
c*x) - (A*b*e - 4*A*c*d + 2*B*b*d)*atanh(sqrt(d + e*x)/sqrt(d))/(b**3*sqrt(d)) +
 (-3*A*b*c*e + 4*A*c**2*d + B*b**2*e - 2*B*b*c*d)*atan(sqrt(c)*sqrt(d + e*x)/sqr
t(b*e - c*d))/(b**3*sqrt(c)*sqrt(b*e - c*d))

_______________________________________________________________________________________

Mathematica [A]  time = 0.302861, size = 152, normalized size = 0.89 \[ \frac{-\frac{\left (-b c (3 A e+2 B d)+4 A c^2 d+b^2 B e\right ) \tanh ^{-1}\left (\frac{\sqrt{c} \sqrt{d+e x}}{\sqrt{c d-b e}}\right )}{\sqrt{c} \sqrt{c d-b e}}+\frac{b \sqrt{d+e x} (b B x-A (b+2 c x))}{x (b+c x)}-\frac{\tanh ^{-1}\left (\frac{\sqrt{d+e x}}{\sqrt{d}}\right ) (A b e-4 A c d+2 b B d)}{\sqrt{d}}}{b^3} \]

Antiderivative was successfully verified.

[In]  Integrate[((A + B*x)*Sqrt[d + e*x])/(b*x + c*x^2)^2,x]

[Out]

((b*Sqrt[d + e*x]*(b*B*x - A*(b + 2*c*x)))/(x*(b + c*x)) - ((2*b*B*d - 4*A*c*d +
 A*b*e)*ArcTanh[Sqrt[d + e*x]/Sqrt[d]])/Sqrt[d] - ((4*A*c^2*d + b^2*B*e - b*c*(2
*B*d + 3*A*e))*ArcTanh[(Sqrt[c]*Sqrt[d + e*x])/Sqrt[c*d - b*e]])/(Sqrt[c]*Sqrt[c
*d - b*e]))/b^3

_______________________________________________________________________________________

Maple [A]  time = 0.03, size = 299, normalized size = 1.8 \[ -{\frac{Ace}{{b}^{2} \left ( cex+be \right ) }\sqrt{ex+d}}+{\frac{Be}{b \left ( cex+be \right ) }\sqrt{ex+d}}-3\,{\frac{Ace}{{b}^{2}\sqrt{ \left ( be-cd \right ) c}}\arctan \left ({\frac{c\sqrt{ex+d}}{\sqrt{ \left ( be-cd \right ) c}}} \right ) }+4\,{\frac{A{c}^{2}d}{{b}^{3}\sqrt{ \left ( be-cd \right ) c}}\arctan \left ({\frac{c\sqrt{ex+d}}{\sqrt{ \left ( be-cd \right ) c}}} \right ) }+{\frac{Be}{b}\arctan \left ({c\sqrt{ex+d}{\frac{1}{\sqrt{ \left ( be-cd \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( be-cd \right ) c}}}}-2\,{\frac{Bdc}{{b}^{2}\sqrt{ \left ( be-cd \right ) c}}\arctan \left ({\frac{c\sqrt{ex+d}}{\sqrt{ \left ( be-cd \right ) c}}} \right ) }-{\frac{A}{{b}^{2}x}\sqrt{ex+d}}-{\frac{Ae}{{b}^{2}}{\it Artanh} \left ({1\sqrt{ex+d}{\frac{1}{\sqrt{d}}}} \right ){\frac{1}{\sqrt{d}}}}+4\,{\frac{\sqrt{d}Ac}{{b}^{3}}{\it Artanh} \left ({\frac{\sqrt{ex+d}}{\sqrt{d}}} \right ) }-2\,{\frac{\sqrt{d}B}{{b}^{2}}{\it Artanh} \left ({\frac{\sqrt{ex+d}}{\sqrt{d}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(e*x+d)^(1/2)/(c*x^2+b*x)^2,x)

[Out]

-e/b^2*(e*x+d)^(1/2)/(c*e*x+b*e)*A*c+e/b*(e*x+d)^(1/2)/(c*e*x+b*e)*B-3*e/b^2/((b
*e-c*d)*c)^(1/2)*arctan(c*(e*x+d)^(1/2)/((b*e-c*d)*c)^(1/2))*A*c+4/b^3/((b*e-c*d
)*c)^(1/2)*arctan(c*(e*x+d)^(1/2)/((b*e-c*d)*c)^(1/2))*A*c^2*d+e/b/((b*e-c*d)*c)
^(1/2)*arctan(c*(e*x+d)^(1/2)/((b*e-c*d)*c)^(1/2))*B-2/b^2/((b*e-c*d)*c)^(1/2)*a
rctan(c*(e*x+d)^(1/2)/((b*e-c*d)*c)^(1/2))*B*c*d-1/b^2*A*(e*x+d)^(1/2)/x-e/b^2/d
^(1/2)*arctanh((e*x+d)^(1/2)/d^(1/2))*A+4/b^3*d^(1/2)*arctanh((e*x+d)^(1/2)/d^(1
/2))*A*c-2/b^2*d^(1/2)*arctanh((e*x+d)^(1/2)/d^(1/2))*B

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(e*x + d)/(c*x^2 + b*x)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.702988, size = 1, normalized size = 0.01 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(e*x + d)/(c*x^2 + b*x)^2,x, algorithm="fricas")

[Out]

[-1/2*(2*(A*b^2 - (B*b^2 - 2*A*b*c)*x)*sqrt(c^2*d - b*c*e)*sqrt(e*x + d)*sqrt(d)
 - ((2*(B*b*c^2 - 2*A*c^3)*d - (B*b^2*c - 3*A*b*c^2)*e)*x^2 + (2*(B*b^2*c - 2*A*
b*c^2)*d - (B*b^3 - 3*A*b^2*c)*e)*x)*sqrt(d)*log((sqrt(c^2*d - b*c*e)*(c*e*x + 2
*c*d - b*e) + 2*(c^2*d - b*c*e)*sqrt(e*x + d))/(c*x + b)) - sqrt(c^2*d - b*c*e)*
((A*b*c*e + 2*(B*b*c - 2*A*c^2)*d)*x^2 + (A*b^2*e + 2*(B*b^2 - 2*A*b*c)*d)*x)*lo
g(((e*x + 2*d)*sqrt(d) - 2*sqrt(e*x + d)*d)/x))/((b^3*c*x^2 + b^4*x)*sqrt(c^2*d
- b*c*e)*sqrt(d)), -1/2*(2*(A*b^2 - (B*b^2 - 2*A*b*c)*x)*sqrt(-c^2*d + b*c*e)*sq
rt(e*x + d)*sqrt(d) - 2*((2*(B*b*c^2 - 2*A*c^3)*d - (B*b^2*c - 3*A*b*c^2)*e)*x^2
 + (2*(B*b^2*c - 2*A*b*c^2)*d - (B*b^3 - 3*A*b^2*c)*e)*x)*sqrt(d)*arctan(-(c*d -
 b*e)/(sqrt(-c^2*d + b*c*e)*sqrt(e*x + d))) - sqrt(-c^2*d + b*c*e)*((A*b*c*e + 2
*(B*b*c - 2*A*c^2)*d)*x^2 + (A*b^2*e + 2*(B*b^2 - 2*A*b*c)*d)*x)*log(((e*x + 2*d
)*sqrt(d) - 2*sqrt(e*x + d)*d)/x))/((b^3*c*x^2 + b^4*x)*sqrt(-c^2*d + b*c*e)*sqr
t(d)), -1/2*(2*(A*b^2 - (B*b^2 - 2*A*b*c)*x)*sqrt(c^2*d - b*c*e)*sqrt(e*x + d)*s
qrt(-d) - 2*sqrt(c^2*d - b*c*e)*((A*b*c*e + 2*(B*b*c - 2*A*c^2)*d)*x^2 + (A*b^2*
e + 2*(B*b^2 - 2*A*b*c)*d)*x)*arctan(d/(sqrt(e*x + d)*sqrt(-d))) - ((2*(B*b*c^2
- 2*A*c^3)*d - (B*b^2*c - 3*A*b*c^2)*e)*x^2 + (2*(B*b^2*c - 2*A*b*c^2)*d - (B*b^
3 - 3*A*b^2*c)*e)*x)*sqrt(-d)*log((sqrt(c^2*d - b*c*e)*(c*e*x + 2*c*d - b*e) + 2
*(c^2*d - b*c*e)*sqrt(e*x + d))/(c*x + b)))/((b^3*c*x^2 + b^4*x)*sqrt(c^2*d - b*
c*e)*sqrt(-d)), -((A*b^2 - (B*b^2 - 2*A*b*c)*x)*sqrt(-c^2*d + b*c*e)*sqrt(e*x +
d)*sqrt(-d) - ((2*(B*b*c^2 - 2*A*c^3)*d - (B*b^2*c - 3*A*b*c^2)*e)*x^2 + (2*(B*b
^2*c - 2*A*b*c^2)*d - (B*b^3 - 3*A*b^2*c)*e)*x)*sqrt(-d)*arctan(-(c*d - b*e)/(sq
rt(-c^2*d + b*c*e)*sqrt(e*x + d))) - sqrt(-c^2*d + b*c*e)*((A*b*c*e + 2*(B*b*c -
 2*A*c^2)*d)*x^2 + (A*b^2*e + 2*(B*b^2 - 2*A*b*c)*d)*x)*arctan(d/(sqrt(e*x + d)*
sqrt(-d))))/((b^3*c*x^2 + b^4*x)*sqrt(-c^2*d + b*c*e)*sqrt(-d))]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(e*x+d)**(1/2)/(c*x**2+b*x)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.28611, size = 316, normalized size = 1.85 \[ -\frac{{\left (2 \, B b c d - 4 \, A c^{2} d - B b^{2} e + 3 \, A b c e\right )} \arctan \left (\frac{\sqrt{x e + d} c}{\sqrt{-c^{2} d + b c e}}\right )}{\sqrt{-c^{2} d + b c e} b^{3}} + \frac{{\left (2 \, B b d - 4 \, A c d + A b e\right )} \arctan \left (\frac{\sqrt{x e + d}}{\sqrt{-d}}\right )}{b^{3} \sqrt{-d}} + \frac{{\left (x e + d\right )}^{\frac{3}{2}} B b e - 2 \,{\left (x e + d\right )}^{\frac{3}{2}} A c e - \sqrt{x e + d} B b d e + 2 \, \sqrt{x e + d} A c d e - \sqrt{x e + d} A b e^{2}}{{\left ({\left (x e + d\right )}^{2} c - 2 \,{\left (x e + d\right )} c d + c d^{2} +{\left (x e + d\right )} b e - b d e\right )} b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*sqrt(e*x + d)/(c*x^2 + b*x)^2,x, algorithm="giac")

[Out]

-(2*B*b*c*d - 4*A*c^2*d - B*b^2*e + 3*A*b*c*e)*arctan(sqrt(x*e + d)*c/sqrt(-c^2*
d + b*c*e))/(sqrt(-c^2*d + b*c*e)*b^3) + (2*B*b*d - 4*A*c*d + A*b*e)*arctan(sqrt
(x*e + d)/sqrt(-d))/(b^3*sqrt(-d)) + ((x*e + d)^(3/2)*B*b*e - 2*(x*e + d)^(3/2)*
A*c*e - sqrt(x*e + d)*B*b*d*e + 2*sqrt(x*e + d)*A*c*d*e - sqrt(x*e + d)*A*b*e^2)
/(((x*e + d)^2*c - 2*(x*e + d)*c*d + c*d^2 + (x*e + d)*b*e - b*d*e)*b^2)